<!DOCTYPE html>
<html lang="en">
<head>
		{{template "pc/public/mycss.html" .}}
</head>
<style type="text/css">
	#wrapper{
		background: #f5f5f5!important;
	}
	.header-center{
		background: #fff;
	}
	.user_left{
		background: #fff;
	}
	.fenlei{
		width: 20%;
	}
	
	@media (max-width: 992px){
		.fenlei{
		    width: 100%;
		}
	}
	.orderdetails .ordershop .state-lcol{border-right: 0;padding-bottom: 0}
	.sendmsg{padding: 10px 20px;border-top: 1px solid #ccc}
	.sendmsg h1{padding: 10px 0 !important;line-height: 20px;font-size: 14px;font-weight: 700;}
	.sendmsg img{width: 100%;}
	.mt-order-list ol span {
	    padding: 5px 10px;
	    border: 1px solid #ddd;
	    margin-right: 10px;
	}
	.mt-order-list ol {
	    margin:10px 0 0 0 !important;
	}
</style>
<body class="common-home res layout-home1">
<div id="wrapper" class="wrapper-full banners-effect-7">
	<!-- Header Container  -->
    {{template "pc/public/head.html" .}}
  	{{template "pc/public/mytop.html" .}}
	<div class="main-container container">
		<div class="row mb-50">
			<!--Left Part Start -->
			{{template "pc/public/myleft.html" .}}
			<!--Middle Part Start-->
			<div id="content" class="col-md-10 col-sm-8 right mt-15">
				<div class="orderdetails">
					<div class="ordershop">
						<div class="state-lcol">
							<!-- <h6>
								<span></span>
								<p>自动取消：10:25:50</p>
							</h6> -->
							<p>
							{{if eq .info.agree "0"}}
							请等待卖家回复
							{{else if eq .info.agree "1"}}
							{{if eq .info.check "0"}}
							请等待卖家检查货物
							{{else if eq .info.check "1"}}
							{{if eq .info.return "0"}}
							请等待卖家打款
							{{else}}
							卖家已打款
							{{end}}
							{{else if eq .info.check "2"}}
							货物检查不合格
							{{end}}
							{{else}}
							卖家不同意退款
							{{end}}
							</p>
							<!-- <div>
								<a href="">马上支付</a>
								<button>取消订单</button>
							</div> -->
						</div>
						<div class="mt-order-list">
							<h1>您已成功发起退款申请，请耐心等待商家处理</h1>
							<div>
								<p><span>•</span>商家同意后，系统将退款给您,如果是已经到货的请返还货物。</p>
								<p><span>•</span>如果商家拒绝，您可以修改退款申请后再次发起，商家会重新处理。</p>
								<ol>
									<span id="del" data-id={{.info.id}}>撤销申请</span>
									{{if eq .info.agree "2"}}
									<a href="/my/order/return_apply?rid={{.info.id}}">修改申请</a>
									{{end}}
								</ol>
							</div>
						</div>
						<div class="mb" style="display: block;width: 100%;height: 5px;"></div>
					</div>
					<div class="order-wrap">
						<!-- <h1 class="important-tips">
							<span>重要提醒：</span>
							该订单会为您保留24.0小时（从下单之日算起），24.0小时之后如果还未付款，系统将自动取消该订单。
						</h1> -->
						<div class="order-invoice">
							<p class="module-head">退款信息</p>
							<div class="clearfix">
								<div>
									<p>退款类型：{{if eq .info.type "0"}}退货{{else}}换货{{end}}</p>
									<p>退款原因：{{.info.whys}}</p>
									<p>订单金额：￥{{.info.money}}</p>
									{{if .info.returnmoney}}
									{{if ne .info.returnmoney "0.00"}}
									<p>退款金额：￥{{.info.returnmoney}}</p>
									{{end}}
									{{end}}
									<p>申请时间：{{.info.addtime}}</p>
									<p>订单编号：{{.info.ordernum}}</p>
									{{if .info.intr}}
									{{if ne .info.intr ""}}
									<p>退款说明：{{.info.intr}}</p>
									{{end}}
									{{end}}
									{{if .info.checkresult}}
									{{if ne .info.checkresult ""}}
									<p>检查结果：{{.info.checkresult}}</p>
									{{end}}
									{{end}}
									{{if .info.result}}
									{{if ne .info.result ""}}
									<p>调查结果：{{.info.result}}</p>
									{{end}}
									{{end}}
									{{if .info.returntime}}
									{{if ne .info.returntime ""}}
									<p>退款时间：{{.info.returntime}}</p>
									{{end}}
									{{end}}
								</div>
								
							</div>
						</div>
						<div class="shopcart mt-20" style="padding: 0px 20px;">
							<table id="test_table" border="0" cellpadding="0" cellspacing="0" class="cart_table">
					                <tbody class="cart_head">
					                    <tr class="header">
					                        <th style="width: 450px;">商品信息</th>
					                        <th>单价</th>
					                        <th>数量</th>
					                    </tr>
					                    {{range .info.product}}
					                    <tr>
					                        <td class="tx-l pro_information">
					                            <img src="{{.pathname}}">
					                            <div>
					                                <p class="overpl1 fs-14">{{.title}}</p>
					                                <p class="c-999 overpl2 fs-12">规格 : {{.number}}{{.spec}}/箱<br>型号 : {{.model}}</p>
					                            </div>
					                        </td>
					                        <td class="unit"><b class="hidden">单价:</b>￥ {{.price}}</td>
					                        <td class="num"><b class="hidden">数量:</b>{{if eq .status "3" "4"}}
											{{if eq .num .sendnum}}
											x{{.num}}
											{{else}}
											实发{{.sendnum}}/{{.num}}
											{{end}}
											{{else}}
											x{{.num}}
											{{end}} / {{if eq .spec2 "1"}}件{{else}}箱{{end}}</td>
					                    </tr>
					                    {{end}}
					                </tbody>
					        </table>
					    </div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- Footer Container -->

{{template "pc/public/foot.html" .}}
{{template "pc/public/myfoot.html" .}}
</body>
</html>
<script type="text/javascript">	
	$('#del').click(function(){
		var id=$(this).attr("data-id")
		wxc.xcConfirm("您确定要撤销申请吗?","confirm",{onOk:function(){
        $.ajax({
          url:window.location.href,
          data:{id:id},
          type:'post',
          success:function(res) {
            if(res==1){
              showToast('撤销成功');
              window.location.href='/my/order'
            }else{
              showToast('网络繁忙,请重试');
            }
          }
        })  
      }});
	})




	var $typeheader = 'header-home1';

	$('.order ul li').click(function() {
		$(this).addClass('on');
		$(this).siblings('li').removeClass('on');
	});
	$(function(){
        $("input[type=button]").click(function(){
	          var txt=$("input[type=text]").val();
	          if($.trim(txt)!=""){
	            $("table tbody:not('.theader')").hide().filter(":contains('"+txt+"')").show();
	        }else{
	            $("table tbody:not('.theader')").css("background","#fff").show();
	        }
 	   });
    })
</script>
